#ifndef _APP_USER_H_
#define _APP_USER_H_

#include "main.h"


typedef enum{
    OPEN_BOX = 0,
    CLOSE_BOX,
}BOX_STATE_E;

typedef enum{
    CHARGE_IDLE = 0,
    CHARGE_RUN,
    CHARGE_FULL,
}CHARGE_STATE_E;

typedef struct
{
	uint8_t box_state;
    uint8_t ear_state[2];
    uint8_t bat_level;
    uint8_t bat_state;
    uint8_t usb_state;
}APP_INFO;



void app_close_box_callback(uint8_t role);
void app_close_box_handle(void);


void app_msg_handle(void);

void app_user_sleep_timer_stop(void);
void app_user_enter_sleep(void);
void app_user_sleep_wakeup(void);

uint8_t app_bat_get_level(void);

void app_bat_server_stop(void);
void app_bat_server_start(void);

void app_user_init(void);
void app_user_deinit(void);


#endif

